package com.hqyj.shop.service.imp;

import com.hqyj.shop.dao.UserDao;
import com.hqyj.shop.dao.UserMessageDao;
import com.hqyj.shop.pojo.User;
import com.hqyj.shop.service.UserMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserMessageServiceImpl implements UserMessageService {
    @Autowired
    private UserMessageDao userMessageDao;

    @Override
    public List<User> getByUserId() {
        List<User> users = userMessageDao.queryAllByUserId();
        return users;
    }

    @Override
    public int delOneByUserId(int userId) {
        int res = userMessageDao.deleteByUserId(5);
        return 1;
    }
}
